timegetter();

function search() {
    if (document.getElementById("search_input").value != "") {
        window.location.href = "https://cn.bing.com/search?q=" + document.getElementById("search_input").value;
        document.getElementById("search_input").value = "";
    }
    return false;
}

function timefilter(time){
    if(time < 10)
        return "0" + time;
    return time;
}

function timegetter() {
    var dateobj = new Date();
    var hour = dateobj.getHours();
    var minute = dateobj.getMinutes();
    document.getElementById("time").innerHTML = timefilter(hour).toString() + ":" + timefilter(minute).toString();
    setTimeout(timegetter,1000);
}